<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0060)http://nettuts.s3.amazonaws.com/001_Tabbed/site/jQuery.html# -->
<HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Reporte Excel</title>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<link media=screen href="<%=request.getContextPath()%>/css/styleTab.css" type=text/css rel=stylesheet>
<link media=screen href="<%=request.getContextPath()%>/css/style1.css" type=text/css rel=stylesheet>
<script language="Javascript" src="<%=request.getContextPath()%>/js/general.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.2.6.js"> </script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.form.js"> </script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-impromptu.1.5.js"></script>
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/base/basico.css" />
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/examples.css" />
<script type="text/jsdemo" charset="utf-8" class='demojs'>
function validar (){   
		f=document.forms[0];
		fecInicio=Trim(f.fecIni.value);
		fecFinal=Trim(f.fecFin.value);
		if(validarForm()== true ){
			exportarFormOculto1();
		}
}
function validarForm(){

	if(document.getElementById("fecIni").value == ''){
		alert('Ingrese Fecha Inicio!!');
		document.getElementById("fecIni").focus();
		return false;
	}if(document.getElementById("fecFin").value == ''){
		alert('Ingrese Fecha Fin!!');
		document.getElementById("fecFin").focus();
		return false;
	}if(document.getElementById("fecIni").value  != '' && document.getElementById("fecFin").value != '' && comparaFechas(document.getElementById("fecIni").value, document.getElementById("fecFin").value) == false ){
		alert("La fecha de Fin debe ser mayor a la fecha de Inicio");
		document.getElementById("fecFin").focus();
		return false;
	  }
	
	return true;
}
function exportarFormOculto1(){	
	document.getElementById("formOculto").src="pages/reportes/reporteExcel_result.jsp";	
}

function exportarFormOculto2(){
	//alert(document.getElementById("formOculto").src=="pages/reportes/reporteExcel_result.jsp" && parent.frames['formOculto'].document.getElementById('generar_')!=null);
	if(document.getElementById("formOculto").src=="pages/reportes/reporteExcel_result.jsp" && parent.frames['formOculto'].document.getElementById('generar_')!=null)
	{
		parent.frames['formOculto'].document.getElementById('fecIni').value=document.getElementById('fecIni').value;
		parent.frames['formOculto'].document.getElementById('fecFin').value=document.getElementById('fecFin').value;
		parent.frames['formOculto'].document.getElementById('str_num_oficina').value=document.getElementById('str_num_oficina').value;
		parent.frames['formOculto'].document.getElementById('generar_').click();
	  
	}
}

</script>

</head>
<body>
<DIV class=tabbed_box id=tabbed_box_1>
<DIV class=tabbed_area>
<UL class=tabs>
  <LI><A class="active">Reporte Excel</A>
  </LI>
  </UL>
<DIV class=content id=content_1>
<UL>

<form action="/expotarExcelAction.do?method=exportar" method="post">
<input type="hidden" name="method">
	<table width="89%" border="0">

		<tr>
			<td align="left" height="25" width="18%">
			<p class="midText">Fecha Inicio</p>
			</td>
			<td align="left" height="25" width="27%"><INPUT name="fecIni"
				size="15" id="fecIni" type="text" class="TEXTINPUT"
				readonly="readonly"> <a style="outline-width: 0;"
				onclick='gfPop.fPopCalendar(fecIni);return false;'> <IMG
				src="<%=request.getContextPath()%>/util/calbtn.gif" name="popcal"
				width="27" height="22" border="0" style="vertical-align: bottom;" />
			</a></td>

			<td align="right" height="25" width="14%">
			<p class="midText">Fecha Fin</p>
			</td>
			<td align="left" height="25" width="27%"><input name="fecFin"
				size="15" id="fecFin" type="text" class="TEXTINPUT"
				readonly="readonly"> <a style="outline-width: 0;"
				onclick='gfPop.fPopCalendar(fecFin);return false;'> <IMG
				src="<%=request.getContextPath()%>/util/calbtn.gif" name="popcal"
				width="28" height="22" border="0" style="vertical-align: bottom;" />
			</a></td>

			<td align="left" 2 height="25" width="101"><input type=button
				value="Generar Reporte" class="boton" name="generar" id="generar"
				onClick="validar();"></td>
		</tr>
		<tr>
			<td align="left" height="28" width="18%">
			<p class="midText">Codigo Oficina</p>
			</td>
			<td align="left" height="28" width="27%"><INPUT
				name="str_num_oficina" size="15" id="str_num_oficina" type="text"
				class="TEXTINPUT" maxlength="4"
				onkeypress="return validaNumeros2(event,false);"></td>


		</tr>


	</table>
	<div id="midPihue"></div>
</form>
</ul>
</div>
</div>
</div>

<iframe id="gToday:normal:util/agenda.js"
	style="Z-INDEX: 101; LEFT: -500px; VISIBILITY: visible; POSITION: absolute; TOP: 0px"
	name="gToday:normal:util/agenda.js" src="util/ipopeng.htm"
	frameBorder="0" width="300" scrolling="no" height="189" ></iframe>
<iframe id="formOculto" height="41" width="646"
	onload="javascript:exportarFormOculto2();" scrolling="no"
	style="visibility: hidden;" frameborder="0"></iframe>




</body>
</HTML>
